package com.terren.spider.db.service;

import java.util.List;

import com.terren.spider.db.basic.IBasicServiceSupport;
import com.terren.spider.entity.biz.DetailXhs;
import com.terren.spider.entity.biz.XhsKeyboardSearch;
import com.terren.spider.entity.biz.XhsUserDetail;
import com.terren.spider.entity.core.XhsVIPUser;


public interface AppXhsService extends IBasicServiceSupport{
	
	//添加详情页的数据
	public void addDetailXhs(List<DetailXhs> items) throws Exception;
	
	//添加用户信息的数据
	public void saveXhsUserDetail(List<XhsUserDetail> items) throws Exception;
	//获取用户id
	public List<String> getXhsUserId() throws Exception;
	//获取小红书用户数据，导出excel时会用到
	public List<XhsUserDetail> getXhsUserDetailList() throws Exception;
	/**
	 * 
	 * @return
	 * @throws Exception
	 * 获取小红书根据关键字搜索数据，导出excel时会用到 
	 */
	public List<XhsKeyboardSearch> getXhsKeyboardSearchList() throws Exception;
	
	
	/**
	 * 抓取进行状态
	 * 状态：0-未抓取,1-抓取完成，9-正在抓取
	 * @param spiderTask
	 * @throws Exception
	 */
	public void updateProgressStatus(List<XhsVIPUser> users) throws Exception;
	/**
	 * 抓取完成
	 * 状态：0-未抓取,1-抓取完成，9-正在抓取
	 * @param spiderTask
	 * @throws Exception
	 */
	public void updateDoneStatus(List<XhsVIPUser> users) throws Exception;
	
	/**
	 * 
	 * @param param
	 * @return
	 * @throws Exception
	 */
	public List<XhsVIPUser> getAllXhsVIPUser(XhsVIPUser param) throws Exception;
	
	
	/**
	 * 更新抓取次数 +1
	 * @param users
	 * @throws Exception
	 */
	public void updateFetchtimes(List<XhsVIPUser> users) throws Exception;
}
